#include <iostream>
#include <vector>
#include <algorithm> 
using namespace std;

int fun(int num1,int num2){
	int index = 1;
	for(int i = 1;i <= num1&&i <= num2;i++){
		if(num1%i==0&&num2%i==0){
			index = i;
		}
	}
	return index;
}
int main(){
	int n;
	cin>>n;
	vector<int> arr(n,0);
	for(int i = 0;i < n;i++){
		cin>>arr[i];
	}
	sort(arr.begin(),arr.end());
	int x = arr[1]-arr[0];
	int y = arr[2]-arr[1];
	int index = fun(x,y);
	int cnt = (arr[n-1]-arr[0])/index+1;
	cout<<cnt<<endl;
	
	system("pause");
	return 0;
} 
